<!doctype html>
<html lang="zh-CN">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
        <meta name="renderer" content="webkit" />
	    <meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no,width=device-width,height=device-height">
        <title>Investor Relationship</title>
        <link href="favicon.ico" rel="shortcut icon">
        <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
        <script src="./js/common/vue.js"></script>
        <script src="./js/common/vue-resource.js"></script>
        <link rel="stylesheet" href="css/common/swiper.css">
        <link rel="stylesheet" href="css/common/base.css">
        
        <link rel="stylesheet" href="css/common/media.css">
        <link rel="stylesheet" href="css/ir.css">
    </head>
    <body>
        <div id="contn">
            <v-header></v-header>
            <v-main :parent-nav="nav" :parent-currentind="currentind" :parent-atcl="atcl" :parent-newsnav="newsnav"></v-main>
            <v-footer></v-footer>
         </div>
        <template id="vMain">
            <main>
                <div class="heading">
                    <div class="storeBox" v-if="parentNav.length" v-html="parentNav[parentCurrentind].htmlContent"></div>
                    <p class="pic fill"><img v-if="parentNav.length" :src="parentNav[parentCurrentind].imagePath" class="obj-c" alt=""></p>
                    <div class="fluid flex flex-align-items fill">
                        <div class="txt ready">
                             <p class="delay-1" v-if="parentNav.length">{{parentNav[parentCurrentind].enName}}</p>
                             <p class="delay-2"></p>
                        </div>
                    </div>
                </div>
                
                <div id="news">
                    <div class="categories flex flex-align-items flex-justify-content">
                        <a href="ir.html?pointId=news">View All</a>
                        <a :href="item.visitUrl" target="_blank" v-for="(item,i) in parentNewsnav">{{item.name}}</a>
                    </div>
                    <div class="info fluid">
                        <p class="ttl">{{parentAtcl.title}}</p>
                        <p class="cd"><span class="cate">{{parentAtcl.category}}</span> | <span class="date">{{parentAtcl.date}}</span></p>
                        <i></i>
                        <div class="txt" v-html="parentAtcl.htmlContent">
                        </div>
                    </div>
                </div>
           </main>
        </template>
        
        <script src="js/common/swiper.js"></script>
        <script src="js/common/jquery.js"></script>
        <script src="./js/common/dataUrl.js"></script>
        <script src="js/common/header.js"></script>
        <script src="js/common/footer.js"></script>
        <script>
            var contn = new Vue({
                el:'#contn',
                data:{
                    currentind:'',
                    nav:[],
                    atcl:{},
                    newsnav:[]
                },
                methods:{
                    writingWeb:function(){
                        //获取heading
                        axios.get(dataUrl + 'api/getNavbar',{
                            headers:{
                                Authorization: headers
                            }
                        })
                        .then((res) => {
                            //console.log(res.data.data);
                            this.nav = res.data.data;
                            for(var a = 0;a < res.data.data.length;a++){
                                if(window.location.href.indexOf('html') < 0){
                                    this.currentind = 0;
                                }else if(window.location.href.indexOf('article') >= 0){
                                    this.currentind = 3;
                                }else if(window.location.href.indexOf(res.data.data[a].visitUrl) >= 0){
                                    this.currentind = a;
                                }
                            }
                            setTimeout(function(){
                                $('main .heading .fluid .txt p:eq(1)').text($('main .heading .storeBox p:eq(0)').text());
                                $('main .tips p').text($('main .heading .storeBox p:eq(1)').text());
                            },10)
                        });

                        //获取新闻导航
                        axios.post(dataUrl + 'api/v2/getNavbarDetails',{id:79,size:0,page:5},{
                            headers:{
                                Authorization: headers
                            }
                        })
                        .then((res) => {
                            //console.log(res.data.data);
                            this.newsnav = res.data.data;
                        });

                        //新闻内容
                        var atclId = GetQueryString('atclId');
                        axios.post(dataUrl + 'api/getArchiveDetail',{id:atclId},{
                            headers:{
                                Authorization: headers
                            }
                        })
                        .then((res) => {
                            //console.log(res.data.data);
                            this.atcl = res.data.data;
                            var date = this.atcl.createTime.split(' ')[0].split('-');
                            var month = String(parseInt(date[1]));
                                var dateStr = date[2] + ' ';
                                switch(month){
                                    case '1':
                                        dateStr += 'January ';
                                        break;
                                    case '2':
                                        dateStr += 'Feburary ';
                                        break;
                                    case '3':
                                        dateStr += 'March ';
                                        break;
                                    case '4':
                                        dateStr += 'April ';
                                        break;
                                    case '5':
                                        dateStr += 'May ';
                                        break;
                                    case '6':
                                        dateStr += 'June ';
                                        break;
                                    case '7':
                                        dateStr += 'July ';
                                        break;
                                    case '8':
                                        dateStr += 'August ';
                                        break;
                                    case '9':
                                        dateStr += 'September ';
                                        break;
                                    case '10':
                                        dateStr += 'October ';
                                        break;
                                    case '11':
                                        dateStr += 'November ';
                                        break;
                                    case '12':
                                        dateStr += 'December ';
                                        break;
                                }
                                dateStr += date[0];
                                this.atcl.date = dateStr;
                        })
                    },
                    
                },
                created:function(){
                    this.writingWeb();
                },
                mounted:function(){
                    ifMounted = true;
                },
                components:{
                    vMain:{
                        template: '#vMain',
                        methods:{
                            myself:function(){
                                this.$emit('myfunc');
                            }
                        },
                        props:['parentNav','parentCurrentind','parentAtcl','parentNewsnav'],
                    }
                },
            })
        </script>
        <script src="js/common/common.js"></script>
        <script src="js/common/animation.js"></script>
        <script src="js/ir.js"></script>
    </body>
</html>